Kinetis SDK API Reference Manual  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
µC/OS-III Abstraction Layer

The Kinetis SDK provides the µC/OS-III for synchronization, mutual exclusion, message queue, etc. More...

Data Structures

struct  EVENT_UCOSIII
 Type for an event group object in uCOS-III. More...
 

Macros

#define kSyncWaitForever   0xFFFFFFFFU
 Constant to pass as timeout value in order to wait indefinitely. More...
 
#define FSL_RTOS_CURRENT_TASK   ((task_handler_t)OSTCBCurPtr)
 Macro passed to the task_destroy function to destroy the current task.
 

Typedefs

typedef OS_TCB * task_handler_t
 Type for a task handler, returned by the task_create function. More...
 
typedef CPU_STK task_stack_t
 Type for a task stack. More...
 
typedef void(* task_t )(void *start)
 Type for a task pointer. More...
 
typedef OS_SEM sync_object_t
 Type for an synchronization object. More...
 
typedef OS_MUTEX lock_object_t
 Type for a resource locking object. More...
 
typedef OS_FLAGS event_group_t
 Type for an event flags group, bit 32 is reserved. More...
 
typedef EVENT_UCOSIII event_object_t
 Type for an event group object.
 
typedef OS_Q msg_queue_t
 Type for a message queue declaration and creation. More...
 
typedef msg_queue_tmsg_queue_handler_t
 Type for a message queue handler.
 
typedef void * msg_queue_item_t
 Type for a message queue item. More...
 

Thread management

#define FSL_RTOS_TASK_DEFINE(task, stackSize, name, usesFloat)
 Creates a task descriptor that is used to create the task with task_create. More...
 
#define task_create(task, priority, param, handler)
 Creates and sets the task to active. More...
 

Synchronization

#define sync_object_declare(obj)   sync_object_t obj
 Create the synchronization object. More...
 

Resource locking

#define lock_object_declare(obj)   lock_object_t obj
 Create the locking object. More...
 

Message queues

#define MSG_QUEUE_DECLARE(name, number, size)   msg_queue_t name
 This macro statically reserves the memory required for the queue. More...
 

Critical Sections

#define rtos_enter_critical   OS_CRITICAL_ENTER
 Ensures the following code will not be preempted.
 
#define rtos_exit_critical   OS_CRITICAL_EXIT
 Allows preemption.
 

Data Structure Documentation

struct EVENT_UCOSIII

Data Fields

OS_FLAG_GRP group
 uCOS-III's event entity
 
event_clear_type clearType
 Auto clear or manual clear.
 

Macro Definition Documentation

#define kSyncWaitForever   0xFFFFFFFFU
#define FSL_RTOS_TASK_DEFINE (   task,
  stackSize,
  name,
  usesFloat 
)
Value:
OS_TCB TCB_##task; \
task_stack_t fslTaskStack_##task[(stackSize)/sizeof(task_stack_t)]; \
uint8_t fslTaskName_##task[] = name; \
bool fslTaskFloatUse_##task = usesFloat
uint32_t task_stack_t
Type for a task stack.
Definition: fsl_os_abstraction_bm.h:79
Parameters
taskThe task function.
stackSizeNumber of elements in the stack for this task.
nameString to assign to the task.
usesFloatBoolean that indicates whether the task uses the floating point unit.
#define task_create (   task,
  priority,
  param,
  handler 
)
Value:
(*(handler) = &(TCB_##task), \
fslTaskName_##task, \
sizeof(fslTaskStack_##task), \
fslTaskStack_##task, \
priority, \
param, \
fslTaskFloatUse_##task, \
handler))
fsl_rtos_status __task_create(task_t task, uint8_t *name, uint16_t stackSize, task_stack_t *stackMem, uint16_t priority, void *param, bool usesFloat, task_handler_t *handler)
Create a task.
Parameters
taskThe task function.
priorityInitial priority of the task.
paramPointer to be passed to the task when it is created.
handlerReturns the identifier to be used afterwards to destroy the task.
Return values
kSuccessThe task was successfully created.
kErrorCreation of task failed.
#define sync_object_declare (   obj)    sync_object_t obj

To be used instead of a standard declaration.

Parameters
objThe sync object to create.
#define lock_object_declare (   obj)    lock_object_t obj

To be used instead of a standard declaration.

Parameters
objThe lock object to create.
#define MSG_QUEUE_DECLARE (   name,
  number,
  size 
)    msg_queue_t name
Parameters
nameIdentifier for the memory region.
numberNumber of elements in the queue.
sizeSize of every elements in words.

Typedef Documentation

typedef OS_TCB* task_handler_t
typedef CPU_STK task_stack_t
typedef void(* task_t)(void *start)
typedef OS_SEM sync_object_t
typedef OS_MUTEX lock_object_t
typedef OS_FLAGS event_group_t
typedef OS_Q msg_queue_t
typedef void* msg_queue_item_t